<?php
if (! defined ( 'BASEPATH' )) exit ( 'No direct script access allowed' );
	class Model_main extends CI_Model {
		public function __construct() {
			parent::__construct ();
	
		}
		
	function get_product_category(){
		$query = $this->db->query ( 'select * from tbl_product_cate order by product_cate_id asc' );
		return $query->result ();
	}
	
	function get_product_rate(){
		$query = $this->db->query ( 'select * from tbl_product_rate order by product_rate_id asc' );
		return $query->result ();
	}
	
	
	
	
	function get_product_format(){
    	$data_query = $this->db->query ( "SELECT * from tbl_product_format order by product_format_id ASC" );
		
    	$result = array();
		$result[""]="印刷書体指定";
		foreach($data_query->result () as $row){
			
			$result[$row->product_format_id]= $row->product_format_name;
			
		}
    	
    	return $result;   
	 }
	 
	 
	 
	 function get_package(){
    	$data_query = $this->db->query ( "SELECT * from tbl_package order by package_id ASC" );
		
    	$result = array();
		$result[""]="包装形態";
		foreach($data_query->result () as $row){
			
			$result[$row->package_id]= $row->package_name;
			
		}
    	
    	return $result;   
	 }

		
}